home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / QuickTimeVRFormat.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  13.4 KB  |  409 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QuickTimeVRFormat.p
  3.  
  4.      Contains:    QuickTime VR interfaces
  5.  
  6.      Version:    Technology:    QuickTime VR 2.1
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1997-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT QuickTimeVRFormat;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __QUICKTIMEVRFORMAT__}
  27. {$SETC __QUICKTIMEVRFORMAT__ := 1}
  28.  
  29. {$I+}
  30. {$SETC QuickTimeVRFormatIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __CONDITIONALMACROS__}
  34. {$I ConditionalMacros.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __DIALOGS__}
  37. {$I Dialogs.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __MOVIES__}
  40. {$I Movies.p}
  41. {$ENDC}
  42. {$IFC UNDEFINED __QUICKTIMEVR__}
  43. {$I QuickTimeVR.p}
  44. {$ENDC}
  45.  
  46.  
  47. {$PUSH}
  48. {$ALIGN MAC68K}
  49. {$LibExport+}
  50.  
  51. {  User data type for the Movie Controller type specifier }
  52.  
  53. CONST
  54.     kQTControllerType            = 'ctyp';                        {  Atom & ID of where our }
  55.     kQTControllerID                = 1;                            {  ...controller name is stored }
  56.  
  57. {  VRWorld atom types }
  58.     kQTVRWorldHeaderAtomType    = 'vrsc';
  59.     kQTVRImagingParentAtomType    = 'imgp';
  60.     kQTVRPanoImagingAtomType    = 'impn';
  61.     kQTVRObjectImagingAtomType    = 'imob';
  62.     kQTVRNodeParentAtomType        = 'vrnp';
  63.     kQTVRNodeIDAtomType            = 'vrni';
  64.     kQTVRNodeLocationAtomType    = 'nloc';
  65.     kQTVRCursorParentAtomType    = 'vrcp';                        {  New with 2.1 }
  66.     kQTVRCursorAtomType            = 'CURS';                        {  New with 2.1 }
  67.     kQTVRColorCursorAtomType    = 'crsr';                        {  New with 2.1 }
  68.  
  69. {  NodeInfo atom types }
  70.     kQTVRNodeHeaderAtomType        = 'ndhd';
  71.     kQTVRHotSpotParentAtomType    = 'hspa';
  72.     kQTVRHotSpotAtomType        = 'hots';
  73.     kQTVRHotSpotInfoAtomType    = 'hsin';
  74.     kQTVRLinkInfoAtomType        = 'link';
  75.  
  76. {  Miscellaneous atom types }
  77.     kQTVRStringAtomType            = 'vrsg';
  78.     kQTVRStringEncodingAtomType    = 'vrse';                        {  New with 2.1 }
  79.     kQTVRPanoSampleDataAtomType    = 'pdat';
  80.     kQTVRObjectInfoAtomType        = 'obji';
  81.     kQTVRImageTrackRefAtomType    = 'imtr';                        {  Parent is kQTVRObjectInfoAtomType. Required if track ref is not 1 as required by 2.0 format. }
  82.     kQTVRHotSpotTrackRefAtomType = 'hstr';                        {  Parent is kQTVRObjectInfoAtomType. Required if track ref is not 1 as required by 2.0 format. }
  83.     kQTVRAngleRangeAtomType        = 'arng';
  84.     kQTVRTrackRefArrayAtomType    = 'tref';
  85.     kQTVRPanConstraintAtomType    = 'pcon';
  86.     kQTVRTiltConstraintAtomType    = 'tcon';
  87.     kQTVRFOVConstraintAtomType    = 'fcon';
  88.  
  89.     kQTVRObjectInfoAtomID        = 1;
  90.     kQTVRObjectImageTrackRefAtomID = 1;                            {  New with 2.1, it adds a track reference to select between multiple image tracks }
  91.     kQTVRObjectHotSpotTrackRefAtomID = 1;                        {  New with 2.1, it adds a track reference to select between multiple hotspot tracks }
  92.  
  93. {  Track reference types }
  94.     kQTVRImageTrackRefType        = 'imgt';
  95.     kQTVRHotSpotTrackRefType    = 'hott';
  96.  
  97. {  Old hot spot types }
  98.     kQTVRHotSpotNavigableType    = 'navg';
  99.  
  100. {  Valid bits used in QTVRLinkHotSpotAtom }
  101.     kQTVRValidPan                = $00000001;
  102.     kQTVRValidTilt                = $00000002;
  103.     kQTVRValidFOV                = $00000004;
  104.     kQTVRValidViewCenter        = $00000008;
  105.  
  106.  
  107. {  Values for flags field in QTVRPanoSampleAtom }
  108.     kQTVRPanoFlagHorizontal        = $00000001;
  109.     kQTVRPanoFlagLast            = $80000000;
  110.  
  111.  
  112. {  Values for locationFlags field in QTVRNodeLocationAtom }
  113.     kQTVRSameFile                = 0;
  114.  
  115.  
  116. {  Header for QTVR track's Sample Description record (vrWorld atom container is appended) }
  117.  
  118. TYPE
  119.     QTVRSampleDescriptionPtr = ^QTVRSampleDescription;
  120.     QTVRSampleDescription = RECORD
  121.         descSize:                UInt32;                                    {  total size of the QTVRSampleDescription }
  122.         descType:                UInt32;                                    {  must be 'qtvr' }
  123.         reserved1:                UInt32;                                    {  must be zero }
  124.         reserved2:                UInt16;                                    {  must be zero }
  125.         dataRefIndex:            UInt16;                                    {  must be zero }
  126.         data:                    UInt32;                                    {  Will be extended to hold vrWorld QTAtomContainer }
  127.     END;
  128.  
  129.     QTVRSampleDescriptionHandle            = ^QTVRSampleDescriptionPtr;
  130. {
  131.   =================================================================================================
  132.    Definitions and structures used in the VRWorld QTAtomContainer
  133.   -------------------------------------------------------------------------------------------------
  134. }
  135.  
  136.     QTVRStringAtomPtr = ^QTVRStringAtom;
  137.     QTVRStringAtom = RECORD
  138.         stringUsage:            UInt16;
  139.         stringLength:            UInt16;
  140.         theString:                PACKED ARRAY [0..3] OF UInt8;            {  field previously named "string" }
  141.     END;
  142.  
  143.  
  144.     QTVRWorldHeaderAtomPtr = ^QTVRWorldHeaderAtom;
  145.     QTVRWorldHeaderAtom = RECORD
  146.         majorVersion:            UInt16;
  147.         minorVersion:            UInt16;
  148.         nameAtomID:                QTAtomID;
  149.         defaultNodeID:            UInt32;
  150.         vrWorldFlags:            UInt32;
  151.         reserved1:                UInt32;
  152.         reserved2:                UInt32;
  153.     END;
  154.  
  155.  
  156. {  Valid bits used in QTVRPanoImagingAtom }
  157.  
  158. CONST
  159.     kQTVRValidCorrection        = $00000001;
  160.     kQTVRValidQuality            = $00000002;
  161.     kQTVRValidDirectDraw        = $00000004;
  162.     kQTVRValidFirstExtraProperty = $00000008;
  163.  
  164.  
  165. TYPE
  166.     QTVRPanoImagingAtomPtr = ^QTVRPanoImagingAtom;
  167.     QTVRPanoImagingAtom = RECORD
  168.         majorVersion:            UInt16;
  169.         minorVersion:            UInt16;
  170.         imagingMode:            UInt32;
  171.         imagingValidFlags:        UInt32;
  172.         correction:                UInt32;
  173.         quality:                UInt32;
  174.         directDraw:                UInt32;
  175.         imagingProperties:        ARRAY [0..5] OF UInt32;                    {  for future properties }
  176.         reserved1:                UInt32;
  177.         reserved2:                UInt32;
  178.     END;
  179.  
  180.     QTVRNodeLocationAtomPtr = ^QTVRNodeLocationAtom;
  181.     QTVRNodeLocationAtom = RECORD
  182.         majorVersion:            UInt16;
  183.         minorVersion:            UInt16;
  184.         nodeType:                OSType;
  185.         locationFlags:            UInt32;
  186.         locationData:            UInt32;
  187.         reserved1:                UInt32;
  188.         reserved2:                UInt32;
  189.     END;
  190.  
  191. {
  192.   =================================================================================================
  193.    Definitions and structures used in the Nodeinfo QTAtomContainer
  194.   -------------------------------------------------------------------------------------------------
  195. }
  196.  
  197.     QTVRNodeHeaderAtomPtr = ^QTVRNodeHeaderAtom;
  198.     QTVRNodeHeaderAtom = RECORD
  199.         majorVersion:            UInt16;
  200.         minorVersion:            UInt16;
  201.         nodeType:                OSType;
  202.         nodeID:                    QTAtomID;
  203.         nameAtomID:                QTAtomID;
  204.         commentAtomID:            QTAtomID;
  205.         reserved1:                UInt32;
  206.         reserved2:                UInt32;
  207.     END;
  208.  
  209.     QTVRAngleRangeAtomPtr = ^QTVRAngleRangeAtom;
  210.     QTVRAngleRangeAtom = RECORD
  211.         minimumAngle:            Float32;
  212.         maximumAngle:            Float32;
  213.     END;
  214.  
  215.     QTVRHotSpotInfoAtomPtr = ^QTVRHotSpotInfoAtom;
  216.     QTVRHotSpotInfoAtom = RECORD
  217.         majorVersion:            UInt16;
  218.         minorVersion:            UInt16;
  219.         hotSpotType:            OSType;
  220.         nameAtomID:                QTAtomID;
  221.         commentAtomID:            QTAtomID;
  222.         cursorID:                ARRAY [0..2] OF SInt32;
  223.                                                                         {  canonical view for this hot spot }
  224.         bestPan:                Float32;
  225.         bestTilt:                Float32;
  226.         bestFOV:                Float32;
  227.         bestViewCenter:            QTVRFloatPoint;
  228.                                                                         {  Bounding box for this hot spot }
  229.         hotSpotRect:            Rect;
  230.         flags:                    UInt32;
  231.         reserved1:                UInt32;
  232.         reserved2:                UInt32;
  233.     END;
  234.  
  235.     QTVRLinkHotSpotAtomPtr = ^QTVRLinkHotSpotAtom;
  236.     QTVRLinkHotSpotAtom = RECORD
  237.         majorVersion:            UInt16;
  238.         minorVersion:            UInt16;
  239.         toNodeID:                UInt32;
  240.         fromValidFlags:            UInt32;
  241.         fromPan:                Float32;
  242.         fromTilt:                Float32;
  243.         fromFOV:                Float32;
  244.         fromViewCenter:            QTVRFloatPoint;
  245.         toValidFlags:            UInt32;
  246.         toPan:                    Float32;
  247.         toTilt:                    Float32;
  248.         toFOV:                    Float32;
  249.         toViewCenter:            QTVRFloatPoint;
  250.         distance:                Float32;
  251.         flags:                    UInt32;
  252.         reserved1:                UInt32;
  253.         reserved2:                UInt32;
  254.     END;
  255.  
  256. {
  257.   =================================================================================================
  258.    Definitions and structures used in Panorama and Object tracks
  259.   -------------------------------------------------------------------------------------------------
  260. }
  261.  
  262.     QTVRPanoSampleAtomPtr = ^QTVRPanoSampleAtom;
  263.     QTVRPanoSampleAtom = RECORD
  264.         majorVersion:            UInt16;
  265.         minorVersion:            UInt16;
  266.         imageRefTrackIndex:        UInt32;                                    {  track reference index of the full res image track }
  267.         hotSpotRefTrackIndex:    UInt32;                                    {  track reference index of the full res hot spot track }
  268.         minPan:                    Float32;
  269.         maxPan:                    Float32;
  270.         minTilt:                Float32;
  271.         maxTilt:                Float32;
  272.         minFieldOfView:            Float32;
  273.         maxFieldOfView:            Float32;
  274.         defaultPan:                Float32;
  275.         defaultTilt:            Float32;
  276.         defaultFieldOfView:        Float32;
  277.                                                                         {  Info for highest res version of image track }
  278.         imageSizeX:                UInt32;                                    {  pixel width of the panorama (e.g. 768) }
  279.         imageSizeY:                UInt32;                                    {  pixel height of the panorama (e.g. 2496) }
  280.         imageNumFramesX:        UInt16;                                    {  diced frames wide (e.g. 1) }
  281.         imageNumFramesY:        UInt16;                                    {  diced frames high (e.g. 24) }
  282.                                                                         {  Info for highest res version of hotSpot track }
  283.         hotSpotSizeX:            UInt32;                                    {  pixel width of the hot spot panorama (e.g. 768) }
  284.         hotSpotSizeY:            UInt32;                                    {  pixel height of the hot spot panorama (e.g. 2496) }
  285.         hotSpotNumFramesX:        UInt16;                                    {  diced frames wide (e.g. 1) }
  286.         hotSpotNumFramesY:        UInt16;                                    {  diced frames high (e.g. 24) }
  287.         flags:                    UInt32;
  288.         reserved1:                UInt32;
  289.         reserved2:                UInt32;
  290.     END;
  291.  
  292. {  Special resolution values for the Image Track Reference Atoms. Use only one value per track reference. }
  293.  
  294. CONST
  295.     kQTVRFullTrackRes            = $00000001;
  296.     kQTVRHalfTrackRes            = $00000002;
  297.     kQTVRQuarterTrackRes        = $00000004;
  298.     kQTVRPreviewTrackRes        = $8000;
  299.  
  300.  
  301. TYPE
  302.     QTVRTrackRefEntryPtr = ^QTVRTrackRefEntry;
  303.     QTVRTrackRefEntry = RECORD
  304.         trackRefType:            UInt32;
  305.         trackResolution:        UInt16;
  306.         trackRefIndex:            UInt32;
  307.     END;
  308.  
  309. {
  310.   =================================================================================================
  311.    Object File format 2.0
  312.   -------------------------------------------------------------------------------------------------
  313. }
  314.  
  315. CONST
  316.     kQTVRObjectAnimateViewFramesOn = $00000001;
  317.     kQTVRObjectPalindromeViewFramesOn = $00000002;
  318.     kQTVRObjectStartFirstViewFrameOn = $00000004;
  319.     kQTVRObjectAnimateViewsOn    = $00000008;
  320.     kQTVRObjectPalindromeViewsOn = $00000010;
  321.     kQTVRObjectSyncViewToFrameRate = $00000020;
  322.     kQTVRObjectDontLoopViewFramesOn = $00000040;
  323.     kQTVRObjectPlayEveryViewFrameOn = $00000080;
  324.     kQTVRObjectStreamingViewsOn    = $00000100;
  325.  
  326.     kQTVRObjectWrapPanOn        = $00000001;
  327.     kQTVRObjectWrapTiltOn        = $00000002;
  328.     kQTVRObjectCanZoomOn        = $00000004;
  329.     kQTVRObjectReverseHControlOn = $00000008;
  330.     kQTVRObjectReverseVControlOn = $00000010;
  331.     kQTVRObjectSwapHVControlOn    = $00000020;
  332.     kQTVRObjectTranslationOn    = $00000040;
  333.  
  334.     kGrabberScrollerUI            = 1;                            {  "Object"  }
  335.     kOldJoyStickUI                = 2;                            {   "1.0 Object as Scene"      }
  336.     kJoystickUI                    = 3;                            {  "Object In Scene" }
  337.     kGrabberUI                    = 4;                            {  "Grabber only" }
  338.     kAbsoluteUI                    = 5;                            {  "Absolute pointer" }
  339.  
  340.  
  341.  
  342. TYPE
  343.     QTVRObjectSampleAtomPtr = ^QTVRObjectSampleAtom;
  344.     QTVRObjectSampleAtom = RECORD
  345.         majorVersion:            UInt16;                                    {  kQTVRMajorVersion }
  346.         minorVersion:            UInt16;                                    {  kQTVRMinorVersion }
  347.         movieType:                UInt16;                                    {  ObjectUITypes }
  348.         viewStateCount:            UInt16;                                    {  The number of view states 1 based }
  349.         defaultViewState:        UInt16;                                    {  The default view state number. The number must be 1 to viewStateCount }
  350.         mouseDownViewState:        UInt16;                                    {  The mouse down view state.   The number must be 1 to viewStateCount }
  351.         viewDuration:            UInt32;                                    {  The duration of each view including all animation frames in a view }
  352.         columns:                UInt32;                                    {  Number of columns in movie }
  353.         rows:                    UInt32;                                    {  Number rows in movie }
  354.         mouseMotionScale:        Float32;                                {  180.0 for kStandardObject or kQTVRObjectInScene, actual degrees for kOldNavigableMovieScene. }
  355.         minPan:                    Float32;                                {  Start   horizontal pan angle in degrees }
  356.         maxPan:                    Float32;                                {  End     horizontal pan angle in degrees }
  357.         defaultPan:                Float32;                                {  Initial horizontal pan angle in degrees (poster view) }
  358.         minTilt:                Float32;                                {  Start   vertical   pan angle in degrees }
  359.         maxTilt:                Float32;                                {  End     vertical   pan angle in degrees }
  360.         defaultTilt:            Float32;                                {  Initial vertical   pan angle in degrees (poster view)     }
  361.         minFieldOfView:            Float32;                                {  minimum field of view setting (appears as the maximum zoom effect) must be >= 1 }
  362.         fieldOfView:            Float32;                                {  the field of view range must be >= 1 }
  363.         defaultFieldOfView:        Float32;                                {  must be in minFieldOfView and maxFieldOfView range inclusive }
  364.         defaultViewCenterH:        Float32;
  365.         defaultViewCenterV:        Float32;
  366.         viewRate:                Float32;
  367.         frameRate:                Float32;
  368.         animationSettings:        UInt32;                                    {  32 reserved bit fields }
  369.         controlSettings:        UInt32;                                    {  32 reserved bit fields }
  370.     END;
  371.  
  372. {$IFC OLDROUTINENAMES }
  373.     VRStringAtom                        = QTVRStringAtom;
  374.     VRStringAtomPtr                     = ^VRStringAtom;
  375.     VRWorldHeaderAtom                    = QTVRWorldHeaderAtom;
  376.     VRWorldHeaderAtomPtr                 = ^VRWorldHeaderAtom;
  377.     VRPanoImagingAtom                    = QTVRPanoImagingAtom;
  378.     VRPanoImagingAtomPtr                 = ^VRPanoImagingAtom;
  379.     VRNodeLocationAtom                    = QTVRNodeLocationAtom;
  380.     VRNodeLocationAtomPtr                 = ^VRNodeLocationAtom;
  381.     VRNodeHeaderAtom                    = QTVRNodeHeaderAtom;
  382.     VRNodeHeaderAtomPtr                 = ^VRNodeHeaderAtom;
  383.     VRAngleRangeAtom                    = QTVRAngleRangeAtom;
  384.     VRAngleRangeAtomPtr                 = ^VRAngleRangeAtom;
  385.     VRHotSpotInfoAtom                    = QTVRHotSpotInfoAtom;
  386.     VRHotSpotInfoAtomPtr                 = ^VRHotSpotInfoAtom;
  387.     VRLinkHotSpotAtom                    = QTVRLinkHotSpotAtom;
  388.     VRLinkHotSpotAtomPtr                 = ^VRLinkHotSpotAtom;
  389.     VRPanoSampleAtom                    = QTVRPanoSampleAtom;
  390.     VRPanoSampleAtomPtr                 = ^VRPanoSampleAtom;
  391.     VRTrackRefEntry                        = QTVRTrackRefEntry;
  392.     VRTrackRefEntryPtr                     = ^VRTrackRefEntry;
  393.     VRObjectSampleAtom                    = QTVRObjectSampleAtom;
  394.     VRObjectSampleAtomPtr                 = ^VRObjectSampleAtom;
  395. {$ENDC}  {OLDROUTINENAMES}
  396.  
  397.  
  398.  
  399. {$ALIGN RESET}
  400. {$POP}
  401.  
  402. {$SETC UsingIncludes := QuickTimeVRFormatIncludes}
  403.  
  404. {$ENDC} {__QUICKTIMEVRFORMAT__}
  405.  
  406. {$IFC NOT UsingIncludes}
  407.  END.
  408. {$ENDC}
  409.